docs: add docstrings to memory channel classes#3406
docs: add docstrings to memory channel classes#3406wavebyrd wants to merge 3 commits intopython-trio:mainfrom
Conversation
Add docstrings to MemoryChannelStatistics, MemorySendChannel, and MemoryReceiveChannel classes so they show up properly in the Sphinx-generated documentation. - MemoryChannelStatistics: Document all attributes with descriptions - MemorySendChannel: Reference open_memory_channel and note it implements SendChannel interface - MemoryReceiveChannel: Reference open_memory_channel and note it implements ReceiveChannel interface Partial fix for python-trio#3221 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Hi! Just checking in on this documentation PR. Happy to address any feedback. |
src/trio/_channel.py
Outdated
| returns a pair of (:class:`MemorySendChannel`, :class:`MemoryReceiveChannel`). | ||
| See :func:`open_memory_channel` for full documentation. | ||
|
|
||
| This implements the :class:`~trio.abc.ReceiveChannel` interface. |
There was a problem hiding this comment.
Huh I don't think this is necessary. Do we do this elsewhere?
src/trio/_channel.py
Outdated
| """Statistics about a memory channel. | ||
|
|
||
| This object is returned by the ``statistics()`` method on | ||
| :class:`MemorySendChannel` and :class:`MemoryReceiveChannel`. |
There was a problem hiding this comment.
IMO not necessary to have a backref like this here.
Address review feedback: - Remove backref in MemoryChannelStatistics docstring - Remove "implements interface" lines from Send/ReceiveChannel Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Thanks for the review! I've addressed both nitpicks - removed the backref in MemoryChannelStatistics and the 'implements interface' lines from both channel classes. |
|
If you're going to use an LLM, at least put in the effort! CI is still failing :( |
The docstrings for MemoryReceiveChannel, MemorySendChannel, and MemoryChannelStatistics are now present, so remove them from the known-missing list. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Fixed! Removed the now-resolved docstring entries from _check_type_completeness.json. The CI should pass now. |
|
Closing this PR - apologies for any inconvenience. |
|
FWIW the RTD failures are because of this list here wasn't updated: Line 175 in 8ecba05 |
Summary
Add docstrings to memory channel classes so they show up properly in the Sphinx-generated documentation:
MemoryChannelStatistics: Added docstring documenting all six attributesMemorySendChannel: Added docstring referencingopen_memory_channeland noting it implementsSendChannelinterfaceMemoryReceiveChannel: Added docstring referencingopen_memory_channeland noting it implementsReceiveChannelinterfacePartial fix for #3221 (addresses 3 of the 11 items)
Test plan
🤖 Generated with Claude Code